package flow

scriptObject.metaClass.getProperty = { String name ->
    def metaProperty = scriptObject.metaClass.getMetaProperty(name)
    metaProperty != null ? metaProperty : delegateObject.getProperty(name)
}
scriptObject.metaClass.invokeMethod = { String name, Object[] args ->
    def metaMethod = scriptObject.metaClass.getMetaMethod(name, args)
    metaMethod != null ? metaMethod.invoke(scriptObject, args) : delegateObject.invokeMethod(name, args)
}